import numpy as np

# 创建数组
arr11 = 5 - np.arange(1, 13).reshape(4, 3)

# 计算所有元素的和
total_sum = np.sum(arr11)

# 计算每一列的和
column_sums = np.sum(arr11, axis=0)

# 对每一个元素、每一列求累积和
cumulative_sum_elements = np.cumsum(arr11)
cumulative_sum_columns = np.cumsum(arr11, axis=0)

# 计算每一行的累计积
cumulative_product_rows = np.cumprod(arr11, axis=1)

# 计算所有元素的最小值
min_value = np.min(arr11)

# 计算每一列的最大值
max_values_per_column = np.max(arr11, axis=0)

# 计算所有元素、每一行的均值
mean_all_elements = np.mean(arr11)
mean_per_row = np.mean(arr11, axis=1)

# 计算所有元素、每一列的中位数
median_all_elements = np.median(arr11)
median_per_column = np.median(arr11, axis=0)

# 计算所有元素的方差，每一行的标准差
variance_all_elements = np.var(arr11)
std_dev_per_row = np.std(arr11, axis=1)

# 打印结果
print("Array:\n", arr11)
print("Total sum of all elements:", total_sum)
print("Sum of each column:", column_sums)
print("Cumulative sum for each element:\n", cumulative_sum_elements)
print("Cumulative sum for each column:\n", cumulative_sum_columns)
print("Cumulative product for each row:\n", cumulative_product_rows)
print("Minimum value of all elements:", min_value)
print("Maximum value of each column:", max_values_per_column)
print("Mean of all elements:", mean_all_elements)
print("Mean of each row:", mean_per_row)
print("Median of all elements:", median_all_elements)
print("Median of each column:", median_per_column)
print("Variance of all elements:", variance_all_elements)
print("Standard deviation of each row:", std_dev_per_row)